1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to setting a role based on the capability of a terminal, and, more particularly, to an apparatus and a method of calculating a capability value according to a change in the capability of each terminal and changing a role of the terminal based on the calculated capability value of the terminal.
2. Description of the Related Art
A conventional algorithm, i.e., peer-to-peer (P2P), that is an application level protocol, such as hyper text transfer protocol (HTTP), supports real time communications, resource distribution, resource exchange, and others between computer users. P2P networks can be classified into hybrid P2P networks using a server, and pure P2P networks where every node serves as a server and a client. Pure P2P networks that are based on the fundamental concept of P2P cannot search for and find resources shared by nodes in a large-scale network. A hybrid P2P network shares resources with each of a plurality of nodes through the server, and comprises a central server providing services and P2P nodes having substantial sharing resources. The central server maintains a network connection session with each of the nodes, manages metadata for sharing resources, and easily searches for resources required by the P2P nodes. Each of the P2P nodes accesses the server to search for a node that holds resources in order to search for the sharing resources. A resource is actually exchanged between two connected nodes. Napster was one of the first widely used hybrid P2P networks. However, a hybrid P2P network has limited extensibility, is more costly, and is not stable due to centralization.
Examples of widely used pure P2P networks are Gnutella and Freenet. Gnutella forms a network by connecting each of a plurality of nodes in terms of applications. Each of the nodes floods a search message into a predetermined range to search for a file and obtains information of a node that holds the file. However, since each of the nodes floods a search message periodically into the Gnutella network, the pure P2P network has limited extensibility.
Meanwhile, a P2P overlay network that is constructed by the combination of an actual value and a key obtained from a hash function using a hash table provides extensibility and stability. Chord, Pastry, and CAN are protocols for P2P overlay networks based on a distributed hash table (DHT).
Chord uses an m-bit virtual identification space to assign nodes and sharing files in identification values obtained from a hash function. Also, each of the nodes maintains a routing table called a finger table to easily search for resources.
Microsoft's Pastry assigns uniformly distributed node identifications randomly from a circular 128-bit identification space through an encoding hash. Given a 128-bit key, Pastry routes an associated message toward a live node whose node identification is numerically closest to the key. Each node keeps track of its neighbor set and notifies applications of changes in the set.
CAN obtains a vector P (p=hash (key)) corresponding to a point in a d-dimensional space through the hash function. Each of the nodes stores data corresponding to a zone divided from a virtual space.
In addition, most structural P2P systems have planar structures and peers participating in the P2P systems perform the same role.
Recently, focusing on the fact that terminals participating in the overlay network system based on the DHT have different capabilities, various methods of allowing terminals to perform different roles based on terminal capability have been proposed, and peers are classified as supernodes and leaf nodes according to their roles. However, since the fact that node capability may change has not been taken into consideration, a supernode role assigned in the first place may turn out to be unsuitable later. Meanwhile, in the case where a leaf node role was assigned to a terminal in the first place and the capability of the terminal was increased later, the terminal could not fully utilize its capability due to the first assigned role as a leaf node. Therefore, the overall performance of the P2P system may be lowered.
Korean Published Patent Application No. 2004-0101050 (Method for Allocating Identifier Peer Group in Peer-to-Peer Network) discloses a technology for defining suitable parameters and an algorithm for automatically determining an identifier for a peer group while minimizing an amount of data traffic required for distributing new identifiers, the technology being used when the most suitable existing group identifier is determined and reused, or when the structure of an OwnerZone changes by adding or removing peers, and a new OwnerZone is generated by dividing or merging OwnerZones. In the disclosed invention, however, no teaching about technology for changing the role performed by a terminal based on the terminal capability is described.